package com.my.xq.domain.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.sskj.core.entity.BaseEntity;

@Entity
@Table(name = "xq_plan")
public class Plan extends BaseEntity {
	/**
	 * 方案表
	 */
	private static final long serialVersionUID = 1L;

	@Column(length = 40)
	private String name;	//方案名称
	
	@Column(length = 50)
	private String title;	//方案下面的小字描述
	
	@Column(length = 200)
	private String role;	//方案投票规则
	
	@Column(name = "plan_start_time")
	private Date planStartTime = new Date();	//方案投票的开始时间
	
	@Column(name = "plan_end_time")
	private Date planEndTime = new Date();	//方案投票的结束时间
	
	@Column
	private int planState;	//方案投票的状态	1已经建立没有启用或者停用 2已经启用还未开始 3已经启用正在进行中 4投票时间结束正常关闭 5进行以后手动强制关闭
	
	@Column(length = 400)
	private String description;	//方案详细描述
	
	@Column
	private boolean isbindCourt;	//是否分发绑定了小区
	
	@Column
	private boolean iscreateOption;	//是否成功建立了投票相关的选项
	
	@Column
	private int planCount;	//有多少个业主参与了方案投票
	
	@Transient
	private String files;	// 上传图片ID集合
	
	@Transient
	private List<String> urlList = new ArrayList<String>();
	
	@Transient
	private String proprietorId;

	@Override
	public String toString() {
		return "Plan [name=" + name + ", title=" + title + ", role=" + role + ", planStartTime=" + planStartTime
				+ ", planEndTime=" + planEndTime + ", planState=" + planState + ", description=" + description
				+ ", planCount=" + planCount + ", files=" + files + ", urlList=" + urlList + "]";
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public int getPlanState() {
		return planState;
	}

	public void setPlanState(int planState) {
		this.planState = planState;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getPlanCount() {
		return planCount;
	}

	public void setPlanCount(int planCount) {
		this.planCount = planCount;
	}

	public String getFiles() {
		return files;
	}

	public void setFiles(String files) {
		this.files = files;
	}

	public List<String> getUrlList() {
		return urlList;
	}

	public void setUrlList(List<String> urlList) {
		this.urlList = urlList;
	}

	public Date getPlanStartTime() {
		return planStartTime;
	}

	public void setPlanStartTime(Date planStartTime) {
		this.planStartTime = planStartTime;
	}

	public Date getPlanEndTime() {
		return planEndTime;
	}

	public void setPlanEndTime(Date planEndTime) {
		this.planEndTime = planEndTime;
	}

	public boolean isIsbindCourt() {
		return isbindCourt;
	}

	public void setIsbindCourt(boolean isbindCourt) {
		this.isbindCourt = isbindCourt;
	}

	public boolean isIscreateOption() {
		return iscreateOption;
	}

	public void setIscreateOption(boolean iscreateOption) {
		this.iscreateOption = iscreateOption;
	}

	public String getProprietorId() {
		return proprietorId;
	}

	public void setProprietorId(String proprietorId) {
		this.proprietorId = proprietorId;
	}
}
